<?php
    include "../../class/crop.class.php";
    include "../../function/functionPHP.php";
    
    noCache();
    
    $cropID=$_POST["cropID"];
    $costID=$_POST["costID"];
    $cost=$_POST["cost"];
    
    $cropClass=new crop($cropID);
    $crop=$cropClass->getCrop();
    $farmID=$crop["farmID"];    
    
    for($i=0;$costID[$i];$i++){
        $cropClass->setCost($costID[$i], $cost[$i]);
    }